package com.bean;

import java.util.Random;

/**
 * @author Cc
 * 2024-03-25
 */
public class Student {
    private String name;
    private int age;
    private float weight;

    public Student() {
    }

    public Student(String name, int age, float weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void sayHello(String name) {
        System.out.println("你好，" + name);
    }

    public void show() {
        System.out.printf("%s %d %.2f\n", this.name, this.age, this.weight);
    }

    private int study(String address, Double hour) {
        System.out.println(this.name + "在" + address + "学习" + hour + "小时");
        return new Random().nextInt(101);
    }
}
